<html>
<head>

<title></title>

<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
<!-- Galeria Jquery Luis Duran -->
<link rel="stylesheet" type="text/css" href="js/jqgal/style22.css" media="screen" />
<script src="js/jqgal/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/jqgal/simple_thumbs.js" type="text/javascript"></script>
<style type="text/css">
img {border:none;}
</style>
</head>
<body>
<?
echo'<table width="600"><tr><td>';
$myid= $_REQUEST['id'];
//Busco el Prodicto Principal
require('abrirdb.php');
$prod_prin = mysql_query("SELECT * FROM products WHERE products_id='$myid'");
$origi = mysql_fetch_array($prod_prin);
$myprod = $origi['products_image'];

//Busco las imagenes adicionales
require('abrirdb.php');
$sql_img_ad = mysql_query("SELECT * FROM img_aso WHERE id_prod = '$myid'");
$valid_img_ad= mysql_num_rows($sql_img_ad);
echo'<ul id="thumb_holder">
<li><a href="javascript:void(0);"><img src="images/'.$myprod.'" alt="motherly" width="80" height="80"/> </a></li>';
if($valid_img_ad == 0)
{
echo '';}
else
{
while($view_img_ad= mysql_fetch_array($sql_img_ad))
{
$imagen = $view_img_ad['imagen_aso'];
echo '<li><a href="javascript:void(0);"><img src="ima_ad/'.$imagen.'" width="80" height="80"/></a></li>';
}
echo '</ul>';
}
echo'</td></tr></table>';
echo'<table width="600" align="center"><tr><td>';
//Busco el Prodicto Principal
require('abrirdb.php');
$prod_prin = mysql_query("SELECT * FROM products WHERE products_id='$myid'");
$origi = mysql_fetch_array($prod_prin);
$myprod = $origi['products_image'];
      
//Busco las imagenes adicionales
require('abrirdb.php');
$sql_img_ad = mysql_query("SELECT * FROM img_aso WHERE id_prod = '$myid'");
$valid_img_ad= mysql_num_rows($sql_img_ad);
echo'<ul id="large_images">
<li><img src="images/'.$myprod.'" width="500" height="500"/></li>';
if($valid_img_ad == 0)
{
echo '';}
else
{
while($view_img_ad= mysql_fetch_array($sql_img_ad))
{
$nom_img = $view_img_ad['name_img_ad'];
$imagen = $view_img_ad['imagen_aso'];
$id_popup = $view_img_ad['id_prod'];
echo '<li><img src="ima_ad/'.$imagen.'" width="500" height="500"/></li>';
}
echo '</ul>';
}
echo'</td></tr></table>';

?>
</body>
</html>